<template>
  <div>
    <div
      class="body-container"
      v-for="(content, index) in contents"
      :key="index"
    >
      <div class="main">
        <div class="mainContnt">
          <span>{{ content.title }}</span>
          <span>下单可抵扣{{ content.subContent }}</span>
          <span>仅限可用</span>
        </div>
        <div class="price">
          {{ content.num }}<span>{{ content.unit }}</span>
        </div>
      </div>
      <div class="last">
        <div class="limitTime">
          {{ content.startTime }}-{{ content.endTime }}
        </div>
        <div class="useLimit">
          查看使用限制<img
            src="@/assets/drawable-mdpi/arrows-right.png"
            alt=""
          />
        </div>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },

  props: {
    contents: Array,
  },

  components: {},

  methods: {},
};
</script>

<style scoped>
.body-container {
  width: 320px;
  margin: 0 auto;
  padding: 8px 15px;
  background-color: #fff;
  border-radius: 4px;
  margin-bottom: 10px;
}
.main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 5px;
  border-bottom: 1px solid #eeeeee;
}

.main .mainContnt span {
  display: block;
  font-size: 10px;
  margin-bottom: 5px;
}
.main span:first-child {
  font-weight: 600;
  font-size: 16px;
}
.main .price {
  font-weight: 600;
  font-size: 30px;
  color: green;
}
.main .price span {
  margin-left: 5px;
  font-size: 14px;
}
.last {
  display: flex;
  justify-content: space-between;
  padding: 10px 0 2px;
}
.last .useLimit img {
  margin-left: 5px;
  width: 6px;
  height: 10px;
}
.last .limitTime {
  color: gray;
  font-size: 12px;
}
.last .useLimit {
  color: gray;
  font-size: 12px;
}
</style>